package com.tina.mapper;

import com.tina.entity.TiRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author PIGS
 * @since 2020-06-05
 */
@Repository
public interface TiRoleMapper extends BaseMapper<TiRole> {
    /**
     * 查询菜单使用数量
     *
     * @param menuId 菜单ID
     * @return 结果
     */
    @Select("select count(1) from ti_role_menu_ref where menu_id=#{menuId} ")
    public Integer selectCountRoleMenuByMenuId(Long menuId);
}
